package com.hframe.typefilter;

/**
 * Created by heqian on 17-9-22.
 */
public class EnumToString<T extends Enum> implements FilterRef<String, T> {
    @Override
    public String filter(T object) throws Exception {
        if (null == object)
            return null;

        if (object instanceof Enum)
            return ((T) object).toString();

        return null;
    }
}
